fix(ui): show selected label in Language dropdown when set to Auto#7675
Merged
markijbema merged 2 commits intomainfrom Mar 26, 2026
Merged
fix(ui): show selected label in Language dropdown when set to Auto#7675markijbema merged 2 commits intomainfrom
markijbema merged 2 commits intomainfrom
Conversation
The Select component used a falsy check (!selected) to determine if no value was selected, which caused empty string "" to be treated as "no selection". This made the Language settings dropdown appear empty when set to "Auto (VS Code language)" since the auto option uses "" as its value. Changed to a nullish check (== null) so empty string is treated as a valid selected value and the label function is called correctly.
Kobalte Select treats empty string "" as an empty selection and renders the placeholder instead of calling the label function. Changed the Auto option to use "auto" as its value instead of "", and map it back to "" when calling setLocale. This ensures the dropdown trigger displays "Auto (VS Code language)" when the dropdown is closed. Also reverts the ineffective select.tsx nullish check since Kobalte short-circuits before the render function is called.
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 files)
Reviewed by gpt-5.4-20260305 · 309,637 tokens |
imanolmzd-svg
approved these changes
Mar 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
<Kobalte.Value>used!selected(falsy check) to determine if no value was selected, which incorrectly treated empty string""as "no selection"selected == null(nullish check) so empty string is recognized as a valid value and thelabelfunction renders "Auto (VS Code language)" correctlyBefore
After